package com.annotation;

public class TestAnnotation {

    public static void main(String[] args) {


        Class<AnnotationDemo> demoClass = AnnotationDemo.class;

        //当前类内是有有注解
        boolean annotation = demoClass.isAnnotation();
        System.out.println(annotation);

        //当前类级别是否有指定注解
        System.out.println(demoClass.isAnnotationPresent(StandardDoc.class));

        //获取当前类中的指定注解
        StandardDoc annotation1 = demoClass.getAnnotation(StandardDoc.class);

        //获取这个注解中的一些信息
        System.out.println(annotation1.date());
        System.out.println(annotation1.lastModifyBy());
        System.out.println(annotation1.version());
        System.out.println(annotation1.lastModifyDate());

    }

}
